package com.ruoyi.business.domain;

import java.math.BigDecimal;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 【请填写功能名称】对象 bus_car_package_audit
 *
 * @author ruoyi
 * @date 2022-02-07
 */
public class CarPackageAudit extends BaseEntity {
    private static final long serialVersionUID = 1L;
    public static final Integer STATUS_IN_ROGRESS = 0;//审核中
    public static final Integer STATUS_REJECT = 1;//审核拒绝
    public static final Integer STATUS_PASS = 2;//审核通过
    public static final Integer STATUS_CANCEL = 3;//审核撤销
    /**
     * 主键
     */
    private Long id;

    /**
     * 服务单项id
     */
    @Excel(name = "服务单项id")
    private Long serviceItemId;

    /**
     * 服务单项id
     */
    @Excel(name = "服务单项id")
    private String serviceItemName;

    /**
     * 服务单项备注
     */
    @Excel(name = "服务单项备注")
    private String serviceItemInfo;

    /**
     * 服务单项审核价格
     */
    @Excel(name = "服务单项审核价格")
    private BigDecimal serviceItemPrice;

    /**
     * 流程实例id
     */
    @Excel(name = "流程实例id")
    private String instanceId;

    /**
     * 创建者
     */
    @Excel(name = "创建者")
    private String creator;

    /**
     * 当前审核人id
     */
    @Excel(name = "当前审核人id")
    private Long auditorId;

    //审核人名称
    @Excel(name = "当前审核人名称")
    private String auditorName;
    /**
     * 关联流程id
     */
    @Excel(name = "关联流程id")
    private Long bpmninfoId;

    /**
     * 备注
     */
    @Excel(name = "备注")
    private String info;

    /**
     * 状态【进行中0/审核拒绝1/审核通过2/审核撤销3】
     */
    @Excel(name = "状态【进行中0/审核拒绝1/审核通过2/审核撤销3】")
    private Integer status = STATUS_IN_ROGRESS;

    /**
     * 审核时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss")
    private Date auditTime;

    /**
     * 已审核人的ID
     */
    @Excel(name = "已审核人的ID")
    private String auditUserIds;

    /**设置结束时间取值范围*/
    public void setEndTime(Date endTime){
        if (endTime == null) {
            super.getParams().put("endTime",null);
            return;
        }
        Calendar instance = Calendar.getInstance();
        instance.setTime(endTime);
        instance.add(Calendar.DATE,1);
        String format = new SimpleDateFormat("yyyy-MM-dd").format(instance.getTime());
        super.getParams().put("endTime",format);
    }

    public String getAuditorName() {
        return auditorName;
    }

    public void setAuditorName(String auditorName) {
        this.auditorName = auditorName;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getId() {
        return id;
    }

    public void setServiceItemId(Long serviceItemId) {
        this.serviceItemId = serviceItemId;
    }

    public Long getServiceItemId() {
        return serviceItemId;
    }

    public void setServiceItemName(String serviceItemName) {
        this.serviceItemName = serviceItemName;
    }

    public String getServiceItemName() {
        return serviceItemName;
    }

    public void setServiceItemInfo(String serviceItemInfo) {
        this.serviceItemInfo = serviceItemInfo;
    }

    public String getServiceItemInfo() {
        return serviceItemInfo;
    }

    public void setServiceItemPrice(BigDecimal serviceItemPrice) {
        this.serviceItemPrice = serviceItemPrice;
    }

    public BigDecimal getServiceItemPrice() {
        return serviceItemPrice;
    }

    public void setInstanceId(String instanceId) {
        this.instanceId = instanceId;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getCreator() {
        return creator;
    }

    public void setAuditorId(Long auditorId) {
        this.auditorId = auditorId;
    }

    public Long getAuditorId() {
        return auditorId;
    }

    public void setBpmninfoId(Long bpmninfoId) {
        this.bpmninfoId = bpmninfoId;
    }

    public Long getBpmninfoId() {
        return bpmninfoId;
    }

    public void setInfo(String info) {
        this.info = info;
    }

    public String getInfo() {
        return info;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public Integer getStatus() {
        return status;
    }

    public void setAuditTime(Date auditTime) {
        this.auditTime = auditTime;
    }

    public Date getAuditTime() {
        return auditTime;
    }

    public void setAuditUserIds(String auditUserIds) {
        this.auditUserIds = auditUserIds;
    }

    public String getAuditUserIds() {
        return auditUserIds;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("serviceItemId", getServiceItemId())
                .append("serviceItemName", getServiceItemName())
                .append("serviceItemInfo", getServiceItemInfo())
                .append("serviceItemPrice", getServiceItemPrice())
                .append("instanceId", getInstanceId())
                .append("creator", getCreator())
                .append("auditorId", getAuditorId())
                .append("bpmninfoId", getBpmninfoId())
                .append("info", getInfo())
                .append("status", getStatus())
                .append("auditTime", getAuditTime())
                .append("createTime", getCreateTime())
                .append("auditUserIds", getAuditUserIds())
                .toString();
    }
}
